//
//  MantisLeftTableViewCell.m
//  NLProjectFrameworkDemo
//
//  Created by iosdeveloper on 2020/4/28.
//  Copyright © 2020 yj_zhang. All rights reserved.
//

#import "MantisLeftTableViewCell.h"


@implementation MantisLeftTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setUpView];
    }
    return self;
}

-(void)setUpView{
    [super setUpView];

    [self.avaterView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(adaptWidth750(20));
        make.top.mas_equalTo(topMargin);
        make.width.height.mas_equalTo(adaptWidth750(80));
    }];
    
    ViewRadius(self.avaterView, adaptWidth750(40));

}
-(void)setThreeCorner:(CGSize)bgSize bgView:(UIView *)cornerView{
    [super setThreeCorner:bgSize bgView:cornerView];
    UIColor*borderColor=[UIColor colorWithRed:6/255.0 green:203/255.0 blue:148/255.0 alpha:1.0];
    [cornerView setBorderWithCornerRadius:4 borderWidth:0 borderColor:borderColor type:UIRectCornerTopRight|UIRectCornerBottomLeft|UIRectCornerBottomRight];
}




-(void)reloadCellModel:(MantisCellBaseModel*)data{
    [super reloadCellModel:data];
    NSString*imgStr=data.imgUrl;
    if (imgStr.length>0) {
        [self.avaterView setImageWithURL:[NSURL URLWithString:imgStr] placeholder:[UIImage imageNamed:@"chat_visitor_avater"]];
    }
    
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
